<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>物料设计修改查询</title>
    <link rel="stylesheet" href="../../css/pintuer.css">
    <link rel="stylesheet" href="../../css/admin.css">
    <link rel="stylesheet" href="../../css/bootstrap.css">
    <style>
        input{
            border-top: none;
            border-left: none;
            border-right: none;
            border-bottom: black solid 1px;
        }
        table{
            border: 1px;
            cell-padding:0;
            cell-spacing:0;
            width: 80%;
            margin-top: 20px;
        }
        table thead{
            background-color:#b3d7ff ;
        }
        a{
            cursor: pointer;
        }
    </style>
</head>
<body>
<script src="../../js/jquery-3.4.1.min.js"></script>
<script src="../../js/bootstrap.min.js"></script>
<script src="../../js/bootstrap-table1.15.3.js"></script>
<script>
    $(function () {
        $.ajax({
            url:'/design/selectUpdMateriel.action',
            type:'post',
            dataType:'json',
            success:function (data) {
                var tb = $('#tb_com');
                tb.empty();
                for( var i=0;i<data.length;i++){
                    var tr=$("<tr>");

                    var designId = $("<td>");
                    var a = $("<a href='#'>").text(data[i].designId);
                    designId.append(a);
                    tr.append(designId);

                    var pid =$("<td>").text(data[i].productId);
                    tr.append(pid);

                    var pName =$("<td>").text(data[i].productName);
                    tr.append(pName);

                    var designer = $('<td>').text(data[i].designer);
                    tr.append(designer);

                    var t = $("<td>").text(data[i].registerTime);
                    tr.append(t);

                    var money = $("<td>").text(data[i].costPriceSum)
                    tr.append(money);

                    var change = $("<td>");
                    var a = $("<a href='updMateriel.html?id="+data[i].id+"'>").text("变更");
                    change.append(a);
                    tr.append(change);

                    tb.append(tr);


                }
            }
        });

    })
</script>
<table style="text-align: center;" class="table table-bordered table-hover table-striped table-condensed">
    <thead>
    <tr>
        <th>设计单编号</th>
        <th>产品编号</th>
        <th>产品名称</th>
        <th>设计人</th>
        <th>登记时间</th>
        <th>物料总成本</th>
        <th>变更</th>

    </tr>
    </thead>
    <tbody id="tb_com">
    </tbody>
</table>
</body>
</html>